<!--骨架屏

可作为独立的组件, 不使用mescroll的页面也能单独引入, 以便APP全局统一管理:
import MescrollSkeleton from '@/components/mescroll-uni/components/mescroll-Skeleton.vue';
<mescroll-skeleton></mescroll-skeleton>

-->
<template>
	<view class="mescroll-skeleton" :style="{'position': positionType}">
		<!-- {{position}} -->
		<!-- <view class="rotate" :style="{'top':position, 'position': rotatePosition}"></view> -->
		<rotate-loading :customStyles="{'top':position, 'position': rotatePosition, 'left': '45%'}" />
	</view>
</template>

<script>
	/* 
	 left top
	 left center
	 left bottom
	 right top
	 right center
	 right bottom
	 center top
	 center center
	 center bottom
	 50% 50%
	 25% 75%
	 10px 200px
	 50px 50px
	 initial
	 */
	export default {
		props: {
			position: {
				type: String,
				default: '50%'
			},
			positionType: {
				type: String,
				default: 'fixed'
			},
			rotatePosition: {
				type: String,
				default: 'fixed'
			}
		}
	};
</script>

<style scoped>
	/* 骨架屏的布局 */
	.mescroll-skeleton {
		z-index: 1;
		background-color: #f2f2f2;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		/* 使right生效 */
		height: auto;
		/* 使bottom生效 */
		background-size: 50%;
		background-repeat: no-repeat;
		background-position: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 36rpx;
	}
</style>
